guitools.components
Class PromptDialog

java.lang.Object
  extended by guitools.components.PromptDialog

public class PromptDialog
extends java.lang.Object

Class that shows a dialog prompting for (a list of) various user inputs. Supports String, String[], Integer, Double and File.

Author:
Steven de Jong, steven.dejong@cs.unimaas.nl

Constructor Summary
PromptDialog()
           
 
Method Summary
static java.lang.Object[] promptFor(java.awt.Frame owner, java.lang.String title, java.lang.Object[] classesIn, java.lang.String[] labelsIn, boolean canCancel)
          Show a dialog box in which the user can provide settings.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PromptDialog

public PromptDialog()
Method Detail

promptFor

public static java.lang.Object[] promptFor(java.awt.Frame owner,
                                           java.lang.String title,
                                           java.lang.Object[] classesIn,
                                           java.lang.String[] labelsIn,
                                           boolean canCancel)
Show a dialog box in which the user can provide settings. Provide a title for this dialog box.

Identify each setting with a label. Identify each setting's type with an object of the correct type. In this object you can provide a default value if applicable.

If the user clicks Cancel or closes the dialog box, the method returns null. Otherwise the validity of the input is checked and this input is returned in the same order as the template. You can provide a boolean to indicate whether Cancel can be clicked.